package com.thf.controller;

import com.thf.model.ContactModels;
import com.thf.model.NavModels;
import com.thf.model.TopFootModels;
import com.thf.service.ContactService;
import com.thf.service.NavService;
import com.thf.service.TopFootService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class ContactController {
    @Resource
    private ContactService contactService;
    @Resource
    private TopFootService topFootService ;
    @RequestMapping("/contact")
    public String findall(Model model){
        List<ContactModels> contactModels = contactService.list();
        List<TopFootModels> topFootModels = topFootService.list();
        model.addAttribute("contactData",contactModels);
        model.addAttribute("topFootData",topFootModels);
        return "/contact";
    }
}
